package com.andy.spring.boot.docker.analyzer;

import com.andy.spring.boot.docker.exception.CustomApplicationException;
import org.springframework.boot.diagnostics.AbstractFailureAnalyzer;
import org.springframework.boot.diagnostics.FailureAnalysis;

public class CustomApplicationFailureAnalyzer extends AbstractFailureAnalyzer<CustomApplicationException> {
    @Override
    protected FailureAnalysis analyze(Throwable rootFailure, CustomApplicationException cause) {
        return new FailureAnalysis("Yeah, 自定义失败分析器出现了...!",
                "Ummm... 啥都不做，删库跑路",
                cause);
    }
}
